package com.sxkf.template.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author 杨玉龙
 * @since 2024-11-22 11:49:23
 */
@Data
@TableName("t_comment")
@ApiModel(value = "Comment对象", description = "")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键PK")
      @TableId("id")
    private String id;

    @ApiModelProperty(value = "评论父id",notes = "顶级评论为0")
    @TableField("pid")
    private String pid;

    @ApiModelProperty(value = "顶级id",notes = "顶级评论为0")
    @TableField("top_id")
    private String topId;

    @ApiModelProperty("订单id")
    @TableField("order_id")
    private String orderId;

    @ApiModelProperty("商品ID")
    @TableField("product_id")
    private String productId;

    @ApiModelProperty("商品名称")
    @TableField("product_name")
    private String productName;

    @ApiModelProperty("商品规格")
    @TableField("product_spec")
    private String productSpec;

    @ApiModelProperty("用户ID")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty("评论内容")
    @TableField("content")
    private String content;

    @ApiModelProperty(value = "星星数量",notes = "半颗星=1")
    @TableField("star")
    private Integer star;

//    @ApiModelProperty(value = "评分")
//    @TableField("分数")
//    private Double score;

    @ApiModelProperty("图片")
    @TableField("image_url")
    private String imageUrl;

    @ApiModelProperty("视频")
    @TableField("video_url")
    private String videoUrl;

    @ApiModelProperty(value = "点赞数")
    @TableField("like_count")
    private Integer likeCount;

    @ApiModelProperty("创建时间")
      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("更新时间")
      @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    @ApiModelProperty(value = "子评论")
    @TableField(exist = false)
    private List<Comment> childComment;

    @TableField(exist = false)
    private Long childCount;

    @ApiModelProperty("用户昵称")
    @TableField(exist = false)
    private String userName;

    @ApiModelProperty("用户头像")
    @TableField(exist = false)
    private String userAvatar;

    @ApiModelProperty("订单详情")
    @TableField(exist = false)
    private OrderDetail orderDetail;
}
